package kr.co.doriclassic.forloop;

public class Number {
	int inpNum;
	int tmpNum;

	public Number(int inpNum) {
		this.inpNum = inpNum;
	}
	
	public void reverseNum(){
		do {
			if(inpNum<0){
				System.out.println("양수를 입력하세요!");
			}
			else{
				tmpNum=inpNum%10;
				inpNum/=10;
				System.out.print(tmpNum);
			}
		} while (inpNum>0);
	}
		
}
